import 'package:bilibili/util/color.dart';
import 'package:flutter/material.dart';

class LoginButton extends StatelessWidget {
  final bool enable;
  final String title;
  final VoidCallback? onClicked;

  LoginButton(this.title, {Key? key, this.enable = false, this.onClicked})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialButton(
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
        height: 45,
        onPressed: enable ? onClicked : null,
        disabledColor: primary[50],
        color: primary,
        child: Text(
          title,
          style: TextStyle(color: Colors.white, fontSize: 16),
        ));
  }
}
